package cate.common.table.res.hero.back.sheet;

import cate.common.table.ESheet;
import cate.common.table.res.hero.back.row.HeroBackStarRow;
import easy.java.dev.note.NoteClass;

import java.util.ArrayList;
import java.util.List;

@NoteClass(value = "英雄回退星级奖励")
public class HeroBackStarSheet extends ESheet<HeroBackStarRow> {

    @Override
    public String getSheetName() {
        return "英雄回退星级奖励";
    }

    @Override
    protected HeroBackStarRow buildRow() {
        return new HeroBackStarRow();
    }

    public List<HeroBackStarRow> getRows(int currentStar, int backStar) {
        List<HeroBackStarRow> rows = new ArrayList<>();
        for (HeroBackStarRow row : getList()) {
            if (currentStar >= row.star && backStar < row.star) {
                rows.add(row);
            }
        }
        return rows;
    }
}
